<template>
  <view class="menuBox sales_button">
    <!-- <view @click="declick" class="mainMenu">
      <up-image :show-loading="true" :src="IMG_URL2 + 'common/view-module.svg'" width="24px" height="24px"></up-image>
      <view>销售</view>
    </view>-->
    <uni-fab
      :pattern="pattern"
      :content="content"
      :horizontal="horizontal"
      :vertical="vertical"
      :direction="direction"
      @trigger="trigger"
    ></uni-fab>
  </view>
</template>

<script setup>
import { IMG_URL2 } from "@/config";
import { ref } from "vue";
const pattern = ref({
  buttonColor: "#fff",
  iconColor: "#aaa",
  color: "#000",
  backgroundColor: "#fff"
});
const content = ref([
  {
    iconPath: `${IMG_URL2}shopm/scan.svg`,
    selectedIconPath: `${IMG_URL2}shopm/scan.svg`,
    text: "扫码收银",
    active: false,
    url: "/pagesshop/scancodecashier/index"
  },
  {
    iconPath: `${IMG_URL2}shopm/edit.svg`,
    selectedIconPath: `${IMG_URL2}shopm/scan.svg`,
    text: "经营数据填写",
    active: false,
    url: "/pagesshop/businessdata/index"
  }
]);
const horizontal = ref("right");
const vertical = ref("bottom");
const direction = ref("vertical");
const trigger = (e) => {
  if (e.item.url) {
    uni.navigateTo({
      url: e.item.url
    });
  }
};
onLoad((option) => {
  
});
onMounted(() => {

  
})
</script>

<style lang="scss" scoped>
.sales_button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #fff;
  font-weight: 400;
  text-align: center;
}
</style>
